<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>清单添加页面</title>
  <link rel="stylesheet" href="../../../yl/index.css" />
  <!-- 布局样式 -->
  <link rel="stylesheet" href="../../../yl/style.css" />
  <link rel="stylesheet" href="../../../style/wangeditor.css">
  <link rel="stylesheet" href="../../../yl/mobile.css" />
  <link rel="stylesheet" href="../../../yl/easyui.css" />
  <link rel="stylesheet" href="../../../yl/icon.css" />
</head>

<body>
  <!-- <div id="app"> -->
  <div class="easyui-navpanel" id="app" v-cloak>
    <header>
      <div class="m-toolbar">
        <div class="m-title">{{action=='Add'?'添加清单信息':action=='Modify'?'修改清单信息':''}}</div>
      </div>
    </header>
    <div class="easyui-navpanel panel-body panel-body-nobottom panel-body-noborder" style="height: 3000px"
      id="MainTable" ref="MainTable"
      :data-options="JSON.stringify({ 'TableName': 'list_management', 'form': 'dataForm' ,'primary_key':'List_Management_SerialNumber' })">
      <div class="yl-main">
        <div class="table_titel">
          <div class="titel">编辑清单</div>
        </div>
        <el-form :model="dataForm" ref="form" :inline-message="true" style="width: 100%">
          <el-descriptions :column="1" size="large" border>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">清单类别</div>
              </template>
              <el-form-item prop="List_Type_SerialNumber"
                :rules="[{ required: true, message: '请选择清单类别', trigger: 'change' }]">
                <el-cascader class="borderless-input" v-model="dataForm.List_Type_SerialNumber" filterable
                  :props="{value:'List_Type_SerialNumber',label:'List_Type',children:'children',emitPath:false}"
                  placeholder="请选择清单类别" :options="list_type" style="width: 100%"></el-cascader>
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">清单名称</div>
              </template>
              <el-form-item prop="List_Name" :rules="[{ required: true, message: '请输入清单名称', trigger: 'blur' }]">
                <el-input v-model="dataForm.List_Name" class="borderless-input" placeholder="请输入清单名称" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">办理时限（天）</div>
              </template>
              <el-form-item prop="Processing_Time_Limit" :rules="[{ required: true, message: '请输入办理时限', trigger: 'blur' }]">
                <el-input v-model="dataForm.Processing_Time_Limit" class="borderless-input" placeholder="请输入办理时限" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">责任规定</div>
              </template>
              <el-form-item prop="List_Rule" :rules="[{ required: true, message: '请输入责任规定', trigger: 'blur' }]">
                <el-input type="textarea" :autosize="{ minRows: 2}" v-model="dataForm.List_Rule"
                  class="borderless-input" placeholder="请输入责任规定" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">事项名称</div>
              </template>
              <el-form-item prop="Matter_Name" :rules="[{ required: true, message: '请输入事项名称', trigger: 'blur' }]">
                <el-input v-model="dataForm.Matter_Name" class="borderless-input" placeholder="请输入事项名称" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">事项来源</div>
              </template>
              <el-form-item prop="Source" :rules="[{ required: true, message: '请输入事项来源', trigger: 'blur' }]">
                <el-input v-model="dataForm.Source" class="borderless-input" placeholder="请输入事项来源" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">服务内容</div>
              </template>
              <el-form-item prop="Service_Content" :rules="[{ required: true, message: '请输入服务内容', trigger: 'blur' }]">
                <el-input type="textarea" :autosize="{ minRows: 2}" v-model="dataForm.Service_Content"
                  class="borderless-input" placeholder="请输入服务内容" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">责任人</div>
              </template>
              <el-form-item prop="Responsible_Person" :rules="[{ required: true, message: '请输入责任人', trigger: 'blur' }]">
                <!-- <el-input v-model="dataForm.Responsible_Person" class="borderless-input" placeholder="请输入责任人" /> -->
                <yl-select @change="handlePhone" v-model="dataForm.Responsible_Person" clearable filterable placeholder="请输入责任人"
                  :options="personal_information" :props="{value:'ID_Card_Number',label:'Personal_Name'}">
                  <el-table-column prop="ID_Card_Number" width="180" show-overflow-tooltip
                    label="身份证号"></el-table-column>
                  <el-table-column prop="Personal_Name" show-overflow-tooltip label="姓名"></el-table-column>
                  <el-table-column prop="Birthday" show-overflow-tooltip label="出生日期"></el-table-column>
                  <el-table-column prop="Gender" label="性别"></el-table-column>
                  <el-table-column prop="Nation" label="民族"></el-table-column>
                  <el-table-column prop="Registered_Residence" show-overflow-tooltip label="籍贯"></el-table-column>
                  <el-table-column prop="Contact_Phone" label="联系方式"></el-table-column>
                </yl-select>
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">责任电话</div>
              </template>
              <el-form-item prop="Responsible_Telephone"
                :rules="[{ required: true, message: '请输入责任电话', trigger: 'blur' }]">
                <el-input v-model="dataForm.Responsible_Telephone" class="borderless-input" placeholder="请输入责任电话" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">承办角色</div>
              </template>
              <el-form-item prop="Undertaking_Role" :rules="[{ required: true, message: '请输入承办角色', trigger: 'blur' }]">
                <el-input v-model="dataForm.Undertaking_Role" class="borderless-input" placeholder="请输入承办角色" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">实施主体</div>
              </template>
              <el-form-item prop="Implementing_Subject"
                :rules="[{ required: true, message: '请输入实施主体', trigger: 'blur' }]">
                <el-input v-model="dataForm.Implementing_Subject" class="borderless-input" placeholder="请输入实施主体" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">监督主体</div>
              </template>
              <el-form-item prop="Supervision_Subject"
                :rules="[{ required: true, message: '请输入监督主体', trigger: 'blur' }]">
                <el-input v-model="dataForm.Supervision_Subject" class="borderless-input" placeholder="请输入监督主体" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">监督对象</div>
              </template>
              <el-form-item prop="Supervision_Object"
                :rules="[{ required: true, message: '请输入监督对象', trigger: 'blur' }]">
                <el-input v-model="dataForm.Supervision_Object" class="borderless-input" placeholder="请输入监督对象" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">监督方式</div>
              </template>
              <el-form-item prop="Supervision_Method"
                :rules="[{ required: true, message: '请输入监督方式', trigger: 'blur' }]">
                <el-input v-model="dataForm.Supervision_Method" class="borderless-input" placeholder="请输入监督方式" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">监督电话</div>
              </template>
              <el-form-item prop="Supervision_Telephone"
                :rules="[{ required: true, message: '请输入监督电话', trigger: 'blur' }]">
                <el-input v-model="dataForm.Supervision_Telephone" class="borderless-input" placeholder="请输入监督电话" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">生效时间</div>
              </template>
              <el-form-item prop="Start_Datetime" :rules="[{ required: true, message: '请选择生效时间', trigger: 'change' }]">
                <el-date-picker v-model="dataForm.Start_Datetime" type="datetime" placeholder="请选择生效时间"
                  class="borderless-input" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
                  size="large" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">失效时间</div>
              </template>
              <el-form-item prop="End_Datetime" :rules="[{ required: true, message: '请选择失效时间', trigger: 'change' }]">
                <el-date-picker v-model="dataForm.End_Datetime" type="datetime" placeholder="请选择失效时间"
                  class="borderless-input" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
                  size="large" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">省/市/区</div>
              </template>
              <el-form-item prop="County_Nubmer" :rules="[{ required: true, message: '请选择省/市/区', trigger: 'change' }]">
                <el-cascader @change="changeCity" filterable style="width: 100%;" placeholder="请选择省/市/区"
                  v-model="dataForm.County_Nubmer" :options="city" class="borderless-input"
                  :props="{ emitPath: false, value: 'value',  label: 'label', children: 'children'}"
                  clearable></el-cascader>
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">街道(乡镇)/小区(村庄)</div>
              </template>
              <el-form-item prop="Village_Number"
                :rules="[{ required: true, message: '请选择街道(乡镇)/小区(村庄)', trigger: 'change' }]">
                <el-cascader @change="changeCity1" filterable style="width: 100%;" placeholder="请选择街道(乡镇)/小区(村庄)"
                  v-model="dataForm.Village_Number" :options="city1" class="borderless-input"
                  :props="{ emitPath: false, value: 'ProvinceNumber',  label: 'Province', children: 'children'}"
                  clearable></el-cascader>
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">上传附件</div>
              </template>
              <yl-upload ref="ylUpload" drag @success="success" @remove="remove" :limit="99"
                :file="fileList"></yl-upload>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">图文详情</div>
              </template>
              <el-form-item prop="List_Main" :rules="[{ required: true, message: '请输入图文详情', trigger: 'blur' }]">
                <yl-text-editor v-model="dataForm.List_Main" placeholder="请输入图文详情"></yl-text-editor>
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">窗口办事点</div>
              </template>
              <el-form-item prop="Window_Service_Point"
                :rules="[{ required: true, message: '请输入窗口办事点', trigger: 'blur' }]">
                <yl-text-editor v-model="dataForm.Window_Service_Point" placeholder="请输入窗口办事点"></yl-text-editor>
              </el-form-item>
            </el-descriptions-item>
          </el-descriptions>
        </el-form>
        <div id="ChildTable">
          <el-descriptions
            :data-options="JSON.stringify({ 'TableName': 'list_management_attachment', 'form': 'childDataForm', 'ParentTableName': 'list_management'})">
          </el-descriptions>
          <div class="table_titel">
            <div class="titel">材料清单</div>
            <div class="operation">
              <el-button type="primary" size="small" @click="handleAdd('childDataForm1')">新增</el-button>
              <el-button type="danger" size="small" @click="handleRemove('childDataForm1')">删除</el-button>
            </div>
          </div>
          <el-form :model="{childDataForm1:childDataForm1.filter(item => item.Row_Status != '1')}" ref="form1"
            :inline-message="true" style="width: 100%;margin-bottom: 20px;">
            <el-descriptions v-for="(item,index) in childDataForm1.filter(item => item.Row_Status != '1')" :key="index"
              :data-options="JSON.stringify({ 'TableName': 'list_material', 'form': 'childDataForm1', 'ParentTableName': 'list_management'})"
              :column="1" size="large" border>
              <el-descriptions-item>
                <template #label>
                  <div class="cell-item">所需材料备注</div>
                </template>
                <el-form-item :prop="'childDataForm1.'+index+'.List_Material_Name'"
                  :rules="[{ required: true, message: '请输入所需材料备注', trigger: 'blur' }]">
                  <el-input v-model="item.List_Material_Name" class="borderless-input" placeholder="请输入所需材料备注" />
                </el-form-item>
              </el-descriptions-item>

              <el-descriptions-item>
                <template #label>
                  <div class="cell-item">材料标签</div>
                </template>
                <el-form-item :prop="'childDataForm1.'+index+'.MaterialTerminal1'"
                  :rules="[{ required: true, message: '请选择材料标签', trigger: 'blur' }]">
           

                  <el-select  multiple clearable @change="handelTerminal"
                    v-model.trim="item.MaterialTerminal1" placeholder="请选择材料标签" filterable style="width: 100%">
                    <el-option v-for="(item,index) in MaterialTerminal" :key="index" :label="item.label"
                      :value="item.value"></el-option>
                  </el-select>
                </el-form-item>
              </el-descriptions-item>

              <el-descriptions-item>
                <template #label>
                  <div class="cell-item">材料详情</div>
                </template>
                <el-form-item :prop="'childDataForm1.'+index+'.Main'"
                  :rules="[{ required: true, message: '请输入材料内容', trigger: 'blur' }]">
                  <yl-text-editor v-model="item.Main" placeholder="请输入材料内容"></yl-text-editor>
                </el-form-item>
              </el-descriptions-item>
            </el-descriptions>
          </el-form>
        </div>
      </div>
    </div>
    <footer class="botton-ann">
      <el-button @click="goBack">返回</el-button>
      <el-button type="primary" plain @click="handleSubmit1" :loading="loading">提交</el-button>
    </footer>
  </div>
</body>
<script src="../../../utils/utils.js"></script>
<script src="../../../config/config.js"></script>
<script src="../../../utils/compressor.js"></script>
<script src="../../../utils/wangeditor.js"></script>
<script src="../../../utils/mixins.js"></script>
<script src="../../../yl/vue.js"></script>
<script src="../../../yl/index.js"></script>
<script src="../../../yl/zh-cn.mjs"></script>
<script src="../../../yl/index.iife.min.js"></script>
<script src="../../../yl/jquery.min.js"></script>
<script src="../../../utils/jquery.cookie.js"></script>
<script src="../../../yl/jquery.easyui.min.js"></script>
<script src="../../../yl/jquery.easyui.mobile.js"></script>
<script src="../../../yl/moment.min.js"></script>
<script src="../../../api/request.js"></script>
<script src="./js/add.js"></script>

</html>